package ecmnext.client;

/***************************************************************/
/*                     SOFTWARE SECTION                        */
/***************************************************************/
/*
 * <p>Name: ECMNext</p>
 * <p>Description: Simulation of the platform of trading Software</p>
 * <p>Licence: General Public License</p>
 * <p>Organisation: EC Marseille</p>
 * <p>Persons involved in the project : groupe Plateforme de Trading</p>
 * <p>Current version: 1.0</p>
 */

/***************************************************************/
/*                       IMPORT SECTION                        */
/***************************************************************/

import ecmnext.net.*;
import org.jdom.*;

/***************************************************************/
/*                LoginMessage CLASS SECTION                   */
/***************************************************************/
/**
 * <p>Title : LoginMessage</p>
 * <p>Description : This is the standard message the server is waiting for
 * when the client connects.</p>
 * @author Xuewen YANG ET Antoine COUDERC
 * @version 1.0
 */

public class LoginMessage implements NetworkWritable {

  private String login;
  private String password;
  private String javaversion;

  public LoginMessage(String login, String password,String javaversion) {
    this.login = login;
    this.password = password;
    this.javaversion = javaversion;
  }

  public Element prepareForNetworkOutput(String pt) {
    return new Element("Login")
        .setAttribute("login",login)
        .setAttribute("password",password)
        .setAttribute("javaversion",javaversion);
  }
}
